(function() {
	'use strict';
	angular.module('services.workOrderData.auditData')
		.factory('notPassNCService', notPassNCService);
	function notPassNCService(Restangular,CoreService){
		return {
			query: query,
			fmtSendData: fmtSendData
		};
		//请求方法
		function query(params,callback){
			Restangular.all('sas/workOrderData/NCDistributed/query').post(params).then(callback);
		}
		//格式化需求发送给后端的字段
	    function fmtSendData(sendData){
	      var send = {
	        startTime:'',
	        endTime: '',
	        workDataTypeCode:'',
	        changeTypeCode: ''
	      };
	      send.startTime = CoreService.dateFormat(sendData.startTime, 'yyyy-MM-dd');
	      send.endTime = CoreService.dateFormat(sendData.endTime, 'yyyy-MM-dd');
	      send.workDataTypeCode = sendData.workDataTypeCode;
	      send.changeTypeCode = sendData.changeTypeCode;
	      send.timeType = sendData.timeType;
	      return send;
	    }
	   		
 }	
})();